﻿Public Class cMacroMovimi
    Private lDrEncaMacro As dsGlobalAutoMovimi.GLO_ENCAMACROMOVIMIRow
    Private lDtDetaMacro As dsGlobalAutoMovimi.GLO_DETAMACROMOVIMIDataTable
    Public Sub New(ByVal idMacro As String)
        Try
            Dim daEncaMacro As New dsGlobalAutoMovimiTableAdapters.GLO_ENCAMACROMOVIMITableAdapter
            Dim dadetaMacro As New dsGlobalAutoMovimiTableAdapters.GLO_DETAMACROMOVIMITableAdapter
            Dim dtEncaMacro As dsGlobalAutoMovimi.GLO_ENCAMACROMOVIMIDataTable = daEncaMacro.GetDataByIdMacro(idMacro)
            If dtEncaMacro.Rows.Count > 0 Then
                lDrEncaMacro = dtEncaMacro.Rows(0)
                lDtDetaMacro = dadetaMacro.GetDataByIdMacro(idMacro)
            End If
        Catch ex As Exception
            Throw ex
        End Try
    End Sub
    Public ReadOnly Property IdMacro() As String
        Get
            Return lDrEncaMacro.IDMACRO
        End Get
    End Property
    Public ReadOnly Property Descripcion() As String
        Get
            Return lDrEncaMacro.DESCRIPCION
        End Get
    End Property
    Public ReadOnly Property Fecha() As Date
        Get
            Return lDrEncaMacro.FECHA
        End Get
    End Property
    Public ReadOnly Property DetalleMacro() As dsGlobalAutoMovimi.GLO_DETAMACROMOVIMIDataTable
        Get
            Return lDtDetaMacro
        End Get
    End Property
End Class
